import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import {
  userStore,
  useLayoutStore,
  appStore,
  customLayoutStore
} from './modules'

export const piniaStore = createPinia().use(piniaPluginPersistedstate)

export const useStore = () => ({
  useUserStore: userStore,
  useLayoutStore,
  useAppStore: appStore,
  useCustomLayoutStore: customLayoutStore
})

export { userStore, useLayoutStore, appStore, customLayoutStore }
